package net.zjitc.link;

/**
 * 定义一个双向链表的节点
 * @param <T>
 */
public class DNode<T> {
    DNode prev;
    T data;
    DNode next;

    public DNode(T data) { //前后都没有
        this.data = data;
    }

    public DNode(DNode prev, DNode next) {
        this.prev = prev;
        this.next = next;
    }

    public DNode(DNode prev, T data) {
        this.prev = prev;
        this.data = data;
    }

    public DNode(DNode prev, T data, DNode next) { //前后都有
        this.prev = prev;
        this.data = data;
        this.next = next;
    }

}
